<%@ page import="com.okaysoft.ofb.account.Role" %>
<g:hiddenField name="id" />
<div class="fieldcontain">
	<label for="name">
		<g:message code="user.name.label" default="Name" />
		
	</label>
	<g:textField name="name"  required="true" class="easyui-validatebox"/>
</div>

<div class="fieldcontain">
	<label for="username">
		<g:message code="user.username.label" default="Username" />
	</label>
	<g:textField name="username" required="true" class="easyui-validatebox"/>
</div>

<div class="fieldcontain">
    <label for="username">
        <g:message code="user.role.label" default="Role" />
    </label>
    <g:each in="${Role.list()}">

        <input type="checkbox" name="role" value="${it.id}" id="role${it.id}" /><label for="role${it.id}" style="width:auto">${it.name}</label>
    </g:each>

</div>

<div class="fieldcontain">
    <label for="department">
        <g:message code="department.label" default="部门" />
    </label>
    <input type="text" id="departmentIdCombo" name="department.id" class="easyui-combotree" url="${createLink(action: 'listJson',controller: 'department')}" required="true" style="width:200px;"/>
</div>

<div class="fieldcontain">
	<label for="password">
		<g:message code="user.password.label" default="Password" />
	</label>
    <g:hiddenField name="password" />
	<g:passwordField name="password_new" class="easyui-validatebox"/>
</div>

<div class="fieldcontain">
	<label for="accountExpired">
		<g:message code="user.accountExpired.label" default="Account Expired" />
		
	</label>
	<g:checkBox name="accountExpired" />
</div>

<div class="fieldcontain ">
	<label for="accountLocked">
		<g:message code="user.accountLocked.label" default="Account Locked" />
		
	</label>
	<g:checkBox name="accountLocked"  />
</div>

<div class="fieldcontain ">
	<label for="enabled">
		<g:message code="user.enabled.label" default="Enabled" />
		
	</label>
	<g:checkBox name="enabled" />
</div>

<div class="fieldcontain ">
	<label for="passwordExpired">
		<g:message code="user.passwordExpired.label" default="Password Expired" />
		
	</label>
	<g:checkBox name="passwordExpired" />
</div>

